x86: use 'dom0_mem' to limit the number of pages for dom0
authorDavid Vrabel <david.vrabel@citrix.com>
Mon, 22 Aug 2011 09:05:27 +0000 (10:05 +0100)
committerDavid Vrabel <david.vrabel@citrix.com>
Mon, 22 Aug 2011 09:05:27 +0000 (10:05 +0100)
Use the 'dom0_mem' command line option to set the maximum number of
pages for dom0.  dom0 can use then use the XENMEM_maximum_reservation
memory op to automatically find this limit and reduce the size of any
page tables etc.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
xen/arch/x86/domain_build.c

index d7697e562b921424be31ec7c3d4230c55de2ba76..f818f0b87661c289f46ee2c6d5b4ed57517e944f 100644 (file)
@@ -254,6 +254,8 @@ static unsigned long __init compute_dom0_nr_pages(
     }
 #endif
 
+    d->max_pages = min(max_pages, avail);
+
     return nr_pages;
 }